import {panel, panel_zindex } from "../../orc/panel/panel";
import test_panel from "./test_panel";


export default class test2_panel extends panel {
    private static _this: test2_panel;
    public static get instance() {
        if (test2_panel._this == null) {
            test2_panel._this = new test2_panel();
        }
        return test2_panel._this;
    }
    panel_zindex = panel_zindex.panelLayer;
    prefab_url = ["ui/test/test","test","test2"];   //0为存放地址,1:包名,2为组件名
    
    
    onfirst(){
        super.onfirst();
        console.log('>>>>>>>>>>>>>>>>onLoad test');
        this.view.getChild('n1').asButton.onClick(this.btn_package,this);
        this.view.getChild('n2').asButton.onClick(this.btn_package1,this);
    }

    btn_package(){
        this.close();
        test_panel.instance.open();
    }

    btn_package1(){
        //this.view.getChild('n6').asCom.getChild('n8').asTextField.setVar('exp','0').flushVars();
        this.view.getChild('n6').asTextField.text = '111111111111';
    }

   
   
    btn_package2(){
        //this.view.getChild('n6').asCom.getChild('n8').asTextField.setVar('exp','0').flushVars();
        this.view.getChild('n6').asTextField.text = '111111111111';
    }
    btn_package3(){
        //this.view.getChild('n6').asCom.getChild('n8').asTextField.setVar('exp','0').flushVars();
        this.view.getChild('n6').asTextField.text = '111111111111';
    }
}